package com.example.junit;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.example.fenye.entity.Student;
import com.example.fenye.service.StudentService;

@RunWith(SpringJUnit4ClassRunner.class)

public class TestDb {
	
	@Autowired
	StudentService studentService;
	Student student;
	
	@Before
    public void before() throws Exception{
		Student student = new Student();
		student.setAge(99);
		student.setEducation(2);
		student.setName("李四");
		student.setSexual(1);
    }
	
	@Test
	public void testDb() {
		
		
		
		studentService.addStudent(student);
	}
}
